#include <stdio.h>
#include <math.h>

int main()
{
    int t,i = 1;
    scanf("%d",&t);
    while(t--)
    {
        double n,m;
        scanf("%lf%lf",&n,&m);
        printf("Scenario #%d:\n",i++);
        if((int)n%2==0 || (int)m%2==0)
        printf("%.2lf\n",n*m);
        else
        printf("%.2lf\n",n*m-1+sqrt(2.0));
        printf("\n");
    }

    return 0;
}
